<template>
    <div class="cg-from" :class="[ggclass]">
        <slot></slot>
    </div>
</template>

<script>
import propsMixin from '../mixins/props/index.js'
export default {
	mixins:[propsMixin],
    name: 'c-form',
    props: {
		labelPosition: {//top 纵向排列，left ：横向排列
			type: String,
			default: 'top'
		},
		ggclass:{
			type:String,
			default:''
		},
		labelWidth:{
			type:String,
			default:''
		},
		slotJc: { //插槽排列方式
			type: String,
			default: 'flex-start'
		},
		textAlign: { //文字排列方式
			type: String,
			default: "",
		},

    },
    provide() {
        return {
            cForm: this
        }
    },
    data() {
        return {
            funList: [],
        }
    },
    methods: {
        verify() {
            let num = 0
            this.funList.forEach(v => {
                if (v()) {
                    num++
                }
            })
            return num === 0
        },
        pushInputVerify(v) {
            this.funList.push(v)
        }
    }

}
</script>

<style></style>